
<script type="text/javascript">
  $(document).ready(function() {
	// validate the contact form
	$("#frmParty").validate({
		rules: {
			contactPerson1: { required: true, minlength: 2 },
			mobile1: { required: true, minlength: 10, maxlength: 11 },
			address: { required: true, minlength: 2 }
		},
		messages: {
			contactPerson1: "<img id='emailerror' src='./images/cross.png' height='10' width='10'/>",
			mobile1: "<img id='emailerror' src='./images/cross.png' height='10' width='10'/>",
			address: "<img id='emailerror' src='./images/cross.png' height='10' width='10'/>"
		},
		success:function(label){
			label.html("<img src='./images/right.jpg' height='10' width='10' alt='Valid'>");
		},
	});
});
</script>
<form name="frmParty" action="{$smarty.server.PHP_SELF}" method="post" id="frmParty">
<input type="hidden" name="challanShort" value="{$challanShort}" />
<input type="hidden" name="partyId" value="{$partyId}" />  
<input type="hidden" name="redirectFrom" value="{$redirectFrom}" />
<table align="center" border="1" cellpadding="2" cellspacing="1" >
<tr>
  <td align="center" class="table1" colspan="4">Customer Entry</td>
</tr>
<tr>
	<td class="table2" align="left"><label for="companyName">company Name:</label></td>
  <td class="table2" colspan="3"><input type="text" name="companyName" id="companyName" size="65"></td>
</tr>
<tr>
  <td class="table2" align="left">Contact Person - 1 <font color="red"> *</font> :</td>
  <td class="table2"><input type="text" name="contactPerson1" id="contactPerson1"></td>
  <td class="table2" align="left">Mobile 1 <font color="red"> *</font> :</td>
  <td class="table2"><input type="text" name="mobile1" id="mobile1" value="{$mobile1}"></td>
</tr>
<tr>
  <td class="table2" align="left">Contact Person - 2 :</td>
  <td class="table2"><input type="text" name="contactPerson2" id="contactPerson2"></td>
  <td class="table2" align="left">Mobile 2 :</td>
  <td class="table2"><input type="text" name="mobile2" value="{$mobile2}"></td>
</tr>
<tr>
  <td class="table2" align="left">Contact Person - 3 :</td>
  <td class="table2"><input type="text" name="contactPerson3" id="contactPerson3"></td>
  <td class="table2" align="left">Mobile 3 :</td>
  <td class="table2"><input type="text" name="mobile3" value="{$mobile3}"></td>
</tr>
<tr>
	<tr>
  <td class="table2" align="left">Landline No<font color="red"> *</font> :</td>
  <td class="table2"><input type="text" name="phoneNo" id="phoneNo" value="{$phoneNo}"></td>
  <td class="table2" align="left">Branch :</td>
  <td class="table2" align="left">
    <select name="branchId" id="branchId">
      {html_options values=$branchArray.branchId output=$branchArray.branchName selected=$branchSelected}
    </select>
  </td>
</tr>
<tr>
  <td class="table2" align="left">Address<font color="red"> *</font> :</td>
  <td class="table2" colspan="3"><textarea  name="address" id="address" rows="3" cols="44">{$address}</textarea></td>
</tr>
<tr>
  <td class="table2" align="left">City :</td>
  <td class="table2"><input type="text" name="city" value="{$city}"></td>
  <td class="table2" align="left">Email :</td>
  <td class="table2"><input type="text" name="email" value="{$email}"></td>
</tr>
<tr>
  <td class="table2">&nbsp</td>
  <td class="table2" align="center" ><input class="button" type="submit" name="insertBtn" value="Submit" />
  </td>
  <td class="table2" colspan="3">
  {if $partyId > 0}
  <input class="button" type="submit" name="cancelBtn" value="Cancel" />
  {else}
  &nbsp
  {/if}
  </td>
</tr>
</table>
</form> 